<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>弹性盒子的居中</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            width: 100%;
            height: 100%;
        }
        .wrap{
            width: 100%;
            height: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            -webkit-align-items: center;
            justify-content: center;
            -webkit-justify-content: center;
        }
        .inner{
            width: 400px;
            height: 200px;
            background-color: #ccc;
            position: relative;
            top:0px;
            left: 0px;
            overflow: hidden;
        }
        .left{
            width: 100px;
            height: 100px;
            border-radius: 50px;
            background-color: #fc0;
            position: absolute;
            top: -50px;
            left: -50px;
        }
        .right{
            width: 100px;
            height: 100px;
            border-radius: 50px;
            background-color: #fc0;
            position: absolute;
            bottom: -50px;
            right: -50px;
        }

    </style>
</head>
<body>
    <div class="wrap">
        <div class="inner">
            <div class="left"></div>
            <div class="right"></div>
        </div>

    </div>
</body>
</html>